﻿'Params
'user (Required) : The last.fm username to fetch the recent tracks of.
'artist (Required) : The artist name you are interested in
'startTimestamp (Optional) : An unix timestamp to start at.
'page (Optional) : The page number to fetch. Defaults to first page.
'endTimestamp (Optional) : An unix timestamp to end at.
'api_key (Required) : A Last.fm API key.

'Auth
' This service does not require authentication. 

Public Class UserGetArtistTracks
	Inherits BaseRequest
    Dim artist As String = ""
    Dim user As String = ""
    Dim startTimestamp As String = ""
    Dim endTimestamp As String = ""
    Dim page As String = ""

	Public xmlresponse As XDocument = Nothing

    Public Sub New(artist As String, user As String, startTimestamp As String, endTimestamp As String, page As String)
        Me.artist = artist
        Me.user = user
        Me.startTimestamp = startTimestamp
        Me.endTimestamp = endTimestamp
        Me.page = page

    End Sub

	Public Sub sendRequest()
        InitializeMembers("user.getArtistTracks")

        AddMember("artist", artist, True)
        AddMember("user", user, True)
        AddMember("startTimestamp", startTimestamp, False)
        AddMember("endTimestamp", endTimestamp, False)
        AddMember("page", page, False)
        AddMember("api_key", My.Settings.api_key, False)

        xmlresponse = sendPOSTResponse()
	End Sub

	'	Public Function getResponse() As AlbumGetInfoResponse
	'	Dim response As New AlbumGetInfoResponse
	'		response.album = New Album(xmlresponse.<lfm>.<album>.First)
	'		Return response
	'	End Function
End Class
